﻿<Window x:Class="SsTool.Metadata.Windows.CreatePropertyWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="CreatePropertyWindow" Height="434" Width="438"
        SizeToContent="Height"
        WindowStartupLocation="CenterScreen">
    <Grid>
        <StackPanel Margin="5">
            <TextBlock Text="Name"/>
            <TextBox Text="{Binding Name,Mode=TwoWay}" Width="400"/>

            <TextBlock Text="Caption"/>
            <TextBox Text="{Binding Caption,Mode=TwoWay}"/>

            <TextBlock Text="Identity:"/>
            <CheckBox IsChecked="{Binding IsIdentity,Mode=TwoWay}" IsEnabled="False"/>

            <TextBlock Text="IsNullable:"/>
            <CheckBox IsChecked="{Binding IsNullable,Mode=TwoWay}"/>
            
            <TextBlock Text="Type:"/>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <TextBox Text="{Binding Path=Type.Caption}" Grid.Column="0" IsReadOnly="True"/>
                <Button Content="Select" Grid.Column="1" Name="_ctlBtnSelectType" Click="_ctlBtnSelectType_Click" />
            </Grid>
            <TextBlock Text="TypeFlag:"/>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <TextBox Text="{Binding Path=TypeFlagCaption}" Grid.Column="0" IsReadOnly="True"/>
                <Button Content="Select" Grid.Column="1" Name="_ctlBtnSelectTypeFlag" Click="_ctlBtnSelectTypeFlag_Click" />
            </Grid>
            
            <TextBlock Text="MinLength:"/>
            <TextBox Text="{Binding MinLength,Mode=TwoWay}"/>
            <TextBlock Text="MaxLength:"/>
            <TextBox Text="{Binding MaxLength,Mode=TwoWay}"/>
            <TextBlock Text="OrderIndex:"/>
            <TextBox Text="{Binding OrderIndex,Mode=TwoWay}"/>

            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Content="Submit" Name="_ctlBtnSubmit" Click="_ctlBtnSubmit_Click" Margin="5" />
                <Button Content="Cancel" Name="_ctlBtnCancel" Margin="5" Click="_ctlBtnCancel_Click" />
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>
